﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCSearchAddress.ascx.cs" Inherits="MockPrjTeam2.Pages.Controls.UCSearchAddress" %>
 
 
 <table cellpadding="0" cellspacing="0" style="width: 100%">
  <tr>
      <td colspan="3" style="font-family: Arial, Helvetica, sans-serif; font-size: large; color: #639A18;
                font-weight: bold; width: 592px;">
                Search PostCode
      </td>
      
  </tr>
  <tr>
    <td>
        PostCode:&nbsp&nbsp<asp:TextBox ID="txtPostCode" runat="server"></asp:TextBox>
    </td>
    <td>
        Street:&nbsp&nbsp<asp:TextBox ID="txtStreet" runat="server"></asp:TextBox>
    </td>
    <td>
        Town:&nbsp&nbsp<asp:TextBox ID="txtTown" runat="server"></asp:TextBox>
    </td>
  </tr>
  <tr>
    <td colspan="3">        
        <asp:Button ID="btSearch" runat="server" Text="Search Address" 
            onclick="btSearch_Click" />&nbsp&nbsp
        <asp:Button ID="btNone" runat="server" Text="None" onclick="btNone_Click" />&nbsp&nbsp
        <asp:Button ID="btClear" runat="server" Text="Clear" />        
    </td>    
  </tr>
  <tr>
    <td colspan="3">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
      </asp:ScriptManager>
      <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate> 
        <asp:GridView ID="GVSearchAddress" runat="server" AutoGenerateColumns="False" 
            AllowPaging="True">
            <Columns>
                <asp:TemplateField HeaderText="Select One">
                <ItemTemplate>
                <input name="MyRadioButton" type="radio" 
                    value='<%# Eval("AddressId") %>' />
                </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField = "_Address" HeaderText="Address" />                 
                <asp:BoundField DataField = "PostCode" HeaderText="PostCode" />
                <asp:BoundField DataField = "_Town.TownName" HeaderText="Town" />
                <asp:BoundField DataField = "_County.CountyName" HeaderText="County" />
                <asp:BoundField DataField = "_Country.CountryName" HeaderText="Country" />
            </Columns>
        </asp:GridView>
       
        
       
    </td>
  </tr>
  <tr>
      
  
    <td colspan="3">
        
        <asp:Button ID="btSelect" runat="server" Text="Select" 
            onclick="btSelect_Click" />&nbsp&nbsp        
        <asp:Button ID="btClose" runat="server" Text="Close" />
        
    </td>
     </ContentTemplate>
    </asp:UpdatePanel>
  </tr>
  <tr>
    <td colspan="3">
    <asp:Label ID="lblMsg" runat="server"></asp:Label>
    </td>
  </tr>
  
 </table>


